<?php
	class AdminDthink_Form_ValidateCategory
	{
		public function validCategoryName($categoryName)
		{
			$validator = new Zend_Validate_NotEmpty();
			if($validator->isValid($categoryName))
			{
				$validator = new Zend_Validate_StringLength(1, 100);
				if($validator->isValid($categoryName))
				{
					return true;
				}
				else
				{
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		
		public function validCategorySearch($keyword)
		{
			$validator = new Zend_Validate_NotEmpty();
			if($validator->isValid($keyword))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
